home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / cli / sort1_34.lha / sort1.34 / sort.doc < prev    next >
Text File  |  1994-10-13  |  5KB  |  123 lines

  1. sort.doc    sort Version 1.34        by Rüdiger Werner
  2.  
  3. The program and files in this distribution are freely distributable,
  4. but are also copyright (c) Rüdiger Werner. They may be freely
  5. distributed as long as no more than a nominal fee is charged to cover
  6. time and copying costs.
  7. No commercial usage is permitted without written permission from the
  8. author. Everything in this distribution must be kept together, in original
  9. unmodified form.
  10. This program is cardware, that means if you find this program useable or
  11. if you tried it then I'd like to receive a postcard from you.
  12. Of course I'd be very grateful, if you send some money for this program.
  13. The money will be used for a good purpose: I know very well a small indian
  14. boy who needs to be operated quite urgent. The parent have to pay the
  15. operation themselves, but they can't afford it.
  16.  
  17.  
  18. ***********************************************************************
  19. * Notice that the author can't be made responsible for the destroying *
  20. * or lost of data through use of this program. You use it on your own *
  21. * risc. Please read the Doc-file before using.                        *
  22. ***********************************************************************
  23.  
  24. Please contact me if you have any comments or suggestions
  25. or if you simply tried the program:
  26.  
  27.  E-Mail:  rw2@irz.inf.tu-dresden.de
  28.       wernerr@eeetwc.et.tu-dresden.de
  29.  
  30.  Mail:      Rüdiger Werner
  31.       Stresemannplatz 2
  32.       01309 Dresden
  33.       GERMANY
  34.  
  35.  
  36. Description
  37. -----------
  38.  
  39. The program was written for use in Shell only.
  40. It is started either by simply typing it's name (of course it should be
  41. in the current directory or in the path) or by giving additionally switches
  42. and/or the name of the file what should be sorted.
  43.  
  44.  sort [switches] infile [infile 2 ... ] [outfile]
  45.  
  46. By typing 'sort ?' appears a short help.
  47. The specified file is opened and red in the memory. There it will be sorted
  48. and, if the switches were set, manipulated in the required way.
  49.  
  50. Switches:
  51.  
  52. -a    sorting the file in ascending order (it is optional, because default)
  53.  
  54. -d    sorting the file in descending order
  55.  
  56. -e    after sorting all lines which are empty will be erased.
  57.  
  58. -E    after sorting all lines which are empty or more than once in a file
  59.     will be erased (of course ONE of these lines is kept in the file).
  60.  
  61. -f[y]    using this option one can specify the first line of a range to be
  62.     sorted. if this option is given, ALL actions are done ONLY within
  63.     this range. to give also the last line is not compelling
  64.     if y is bigger than the number of lines of the internal file
  65.     (all in-read files together) an error-message appears and the
  66.     program is cancelled
  67.  
  68. -g    actually the capitals and small letters are distinguished.
  69.     by setting this switch, they won't be distinguished.
  70.  
  71. -j[x]    joins x files and sort them, after that the resulting file will be
  72.     written to <outfile>
  73.  
  74. -J[x]    joins x files but they won't be sorted; the resulting file will be
  75.     written to <outfile>
  76.  
  77. -l[y]    using this option one can specify the last line of a range to be
  78.     sorted. if this option is given, ALL actions are done ONLY within
  79.     this range. to give also the first line is not compelling
  80.     if y is bigger than the number of lines of the internal file
  81.     (all in-read files together) the last line is automatically taken
  82.     as last line of the range
  83.  
  84.     if x or/and y is not given it will be asked for
  85.  
  86.  
  87. -n    the file is not sorted, only empty lines are erased.
  88.  
  89. -N    the file is not sorted, only empty lines and lines with the same
  90.     contents which are side by side are erased (of course ONE line is
  91.     kept in the file).
  92.     Note that it might more useful if the file is sorted.
  93.  
  94. -o    the specified file for reading will be overwritten by the sorted
  95.     file. DANGER!!! If once overwritten the original file can't be
  96.     restored!!!
  97.  
  98. -t    the file which was red will only be written in reverse order of lines
  99.  
  100. The switches can be set at any place after the program name.
  101. The program detects contradictions between given switches to avoid possible
  102. mistakes from the user
  103.  
  104. Notice that the outfilename has to be the last of all filenames.
  105. If no outfilename is given, the first infilename plus a new ending is used
  106. for a suggestion for the outfilename.
  107.  
  108. The maximum length of a line in a file is 1024 byte.
  109. All bytes that a line is longer than this are cutted. A message appears in
  110. this case. If you need to sort longer lines, just send me a mail.
  111.  
  112. The size of the file to be sorted depends only on the size of the available
  113. memory (and on your patience). The used time is shown after sorting, just
  114. for your statistics ...
  115. I have tested the programm with hundreds of different files and no loss
  116. of data appeared.
  117. I'd be grateful for any comments, suggestions and bug reports.
  118. Well, that's all I can tell about it.
  119.  
  120. Hope that you can use the program.
  121.  
  122. Rüdiger Werner
  123.